<?php
$height = $_MODULE['height'] ? $_MODULE['height'] : 600;
$top = $height/2 - 23;
?>


<div class="tb-module tshop-um tshop-um-haibao-slider">
	<div class="wrap1">
		<div class="wrap2">
			<div class="wrap3" style="width: 1920px; height: <?php echo $height; ?>px; margin-left: -490px;">

				<div class="carousel J_TWidget" data-widget-type="Carousel" data-widget-config="{

					'effect':'<?php echo $_MODULE[showEffect]; ?>', 
					'easing': '<?php echo $_MODULE[switchEffect]; ?>',
					'prevBtnCls':'btn-prev', 
					'nextBtnCls':'btn-next', 
					'autoplay': true,
					'viewSize': [1920]

					}" style="width: 1920px; height: <?php echo $height; ?>px;">

					<div class="btns <?php if ($_MODULE[showArrow] == 2) {?>hide<?php } ?>">
						<a class="btn-prev" style="top: <?php echo $top; ?>px;"></a>
						<a class="btn-next" style="top: <?php echo $top; ?>px;"></a>
					</div>

				    <div class="main" style="width: 1920px; height: <?php echo $height; ?>px;">
				        <ul class="ks-switchable-content">
				        	<?php
				        	if ( $_MODULE['img1'] || $_MODULE['img2'] || $_MODULE['img3'] || $_MODULE['img4'] || $_MODULE['img5'] ) {
				        		for ( $i = 1; $i < 6; $i++ ) {
				        			if ($_MODULE['img'.$i]) {
				        				echo '<li style="width: 1920px; height: '. $height .'px;"><a href="'. $_MODULE['link'.$i] .'" style="height: '. $height .'px; background-image: url('. $_MODULE['img'.$i] .');" target="_blank"></a></li>';
				        			}
				        		}
				        	} else {
				        	?>
				        	<li style="width: 1920px; height: <?php echo $height; ?>px;">
				        		<a href="http://zxn.taobao.com/designer_detail.htm?designerId=1021978" style="height: <?php echo $height; ?>px; background-image: url(../../assets/images/banner1.jpg);" target="_blank"></a>
				        	</li>
				        	<li style="width: 1920px; height: <?php echo $height; ?>px;">
				        		<a href="http://zxn.taobao.com/designer_detail.htm?designerId=1021978" style="height: <?php echo $height; ?>px; background-image: url(../../assets/images/banner2.jpg);" target="_blank"></a>
				        	</li>
				        	<?php } ?>
				        </ul>
				    </div>
				    
				    
				    <ul class="ks-switchable-nav <?php if ($_MODULE[showNav] == 2) {?>hide<?php } ?>" style="width: 1920px;">
				    	<?php
				    	$len = 0;

				    	if ( $_MODULE['img1'] || $_MODULE['img2'] || $_MODULE['img3'] || $_MODULE['img4'] || $_MODULE['img5'] ) {
				    		for ( $i = 1; $i < 6; $i++ ) {
				    			if ($_MODULE['img'.$i]) $len++;
				    		}
				    	} else {
				    		$len = 2;
				    	}

				    	for ( $i = 0; $i < $len; $i++ ) {
				    		if ($i == 0) {
				    			echo '<li class="ks-active"></li>'
				    		} else {
				    			echo '<li></li>';
				    		}
				    	}
				    	?>
				    </ul>
				    

				</div>

			</div>
		</div>
	</div>
</div>
